﻿using System;
using System.Collections.Generic;
using System.Net.WebSockets;
using System.Text;

namespace BCDto.WebSocketComponent
{
    /// <summary>
    /// WebSocket用户模型
    /// </summary>
    public class WebSocketUserDto
    {
        /// <summary>
        /// 用户Id
        /// </summary>
        public string UserId { get; set; }
        /// <summary>
        /// 最后登录时间
        /// </summary>
        public DateTime LastLogonTime { get; set; }
        /// <summary>
        /// 最后跳动时间
        /// websocket心跳帧数据修改项
        /// 主要用来确定用户离线或是在线
        /// 当此时间停止更新超过5分钟，测认为此链接已断开
        /// app需要每4分钟发送一次心跳帧的数据包
        /// </summary>
        public DateTime LastBeatTime { get; set; }
        /// <summary>
        /// websocket信息
        /// </summary>
        public WebSocket WebSocket { get; set; }
    }
}
